package tt.dz.egobus.servicemanager.vo;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import tt.dz.egobus.api.managerservice.manager.RequestTask;
import tt.dz.egobus.bean.BaseBean;

/**
 * @author Anson
 * @date 17-3-29
 * @name 业务请求下单服务层Vo
 * @since 1.0.3
 */
public class BusinessRequestVo extends RequestTask implements BaseBean {

    private static final Logger LOGGER = LoggerFactory.getLogger(BusinessRequestVo.class);


    private static final long serialVersionUID = 8863379723407380165L;

    /**
     * @param task
     * @author Anson
     * @date 17-3-29
     * @name 请求下单转换服务层的vo
     * @since 1.0.3
     */
    public static final BusinessRequestVo instance(RequestTask task) {
        BusinessRequestVo vo = new BusinessRequestVo();
        try {
            BeanUtils.copyProperties(task, vo);
        } catch (RuntimeException e) {
            LOGGER.error("业务请求下单服务层Vo的bean转换异常", e);
        }
        return vo;
    }


}
